package appConfig

import (
	config2 "gitee.com/jjawesomejj/awesome-util/config"
	"gitee.com/jjawesomejj/awesome-util/helper/commonhelper"
)

var localSid string

func GetLocalSid() string {
	if localSid != "" {
		return localSid
	}
	localSid = config2.GetConfigByKey("localSid", func() interface{} {
		localMd5 := commonhelper.Md5(commonhelper.Rand(30))
		config2.SetConfigByKey("localSid", localMd5, true)
		return localMd5
	}).(string)
	return localSid
}
